<body>
    <script>
        function getsumArr(arr) {
            let sum = 0
            for (let i = 0; i < arr./*之前这里是legnth*/length; i++) {
                sum +=/*之前没加等于号*/arr[i]
            }
            return sum
        }
        console.log(getsumArr([10, 20, 30, 40]))
    </script>
</body>